home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIProxyObjectManager.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  148 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIProxyObjectManager.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIProxyObjectManager_h__
  6. #define __gen_nsIProxyObjectManager_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIEventQueue; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIProxyObjectManager */
  21. #define NS_IPROXYOBJECTMANAGER_IID_STR "eea90d43-b059-11d2-915e-c12b696c9333"
  22.  
  23. #define NS_IPROXYOBJECTMANAGER_IID \
  24.   {0xeea90d43, 0xb059, 0x11d2, \
  25.     { 0x91, 0x5e, 0xc1, 0x2b, 0x69, 0x6c, 0x93, 0x33 }}
  26.  
  27. /**
  28.  * See http://www.mozilla.org/projects/xpcom/Proxies.html
  29.  */
  30. class NS_NO_VTABLE nsIProxyObjectManager : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROXYOBJECTMANAGER_IID)
  34.  
  35.   /**
  36.      * Constants for proxyType
  37.      */
  38. /**
  39.      * Synchronous: Block until result available, like function call.
  40.      */
  41.   enum { INVOKE_SYNC = 1 };
  42.  
  43.   /**
  44.      * Asynchronous: Return without waiting for result.
  45.      * (Warning: do not pass &pointers into stack when using this flag.)
  46.      */
  47.   enum { INVOKE_ASYNC = 2 };
  48.  
  49.   /**
  50.      * Always create proxy even if for same thread as current thread.
  51.      */
  52.   enum { FORCE_PROXY_CREATION = 4 };
  53.  
  54.   /* void getProxyForObject (in nsIEventQueue destQueue, in nsIIDRef iid, in nsISupports object, in PRInt32 proxyType, [iid_is (iid), retval] out nsQIResult result); */
  55.   NS_IMETHOD GetProxyForObject(nsIEventQueue *destQueue, const nsIID & iid, nsISupports *object, PRInt32 proxyType, void * *result) = 0;
  56.  
  57.   /* void getProxy (in nsIEventQueue destQueue, in nsIIDRef cid, in nsISupports aOuter, in nsIIDRef iid, in PRInt32 proxyType, [iid_is (iid), retval] out nsQIResult result); */
  58.   NS_IMETHOD GetProxy(nsIEventQueue *destQueue, const nsIID & cid, nsISupports *aOuter, const nsIID & iid, PRInt32 proxyType, void * *result) = 0;
  59.  
  60. };
  61.  
  62. /* Use this macro when declaring classes that implement this interface. */
  63. #define NS_DECL_NSIPROXYOBJECTMANAGER \
  64.   NS_IMETHOD GetProxyForObject(nsIEventQueue *destQueue, const nsIID & iid, nsISupports *object, PRInt32 proxyType, void * *result); \
  65.   NS_IMETHOD GetProxy(nsIEventQueue *destQueue, const nsIID & cid, nsISupports *aOuter, const nsIID & iid, PRInt32 proxyType, void * *result); 
  66.  
  67. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  68. #define NS_FORWARD_NSIPROXYOBJECTMANAGER(_to) \
  69.   NS_IMETHOD GetProxyForObject(nsIEventQueue *destQueue, const nsIID & iid, nsISupports *object, PRInt32 proxyType, void * *result) { return _to GetProxyForObject(destQueue, iid, object, proxyType, result); } \
  70.   NS_IMETHOD GetProxy(nsIEventQueue *destQueue, const nsIID & cid, nsISupports *aOuter, const nsIID & iid, PRInt32 proxyType, void * *result) { return _to GetProxy(destQueue, cid, aOuter, iid, proxyType, result); } 
  71.  
  72. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  73. #define NS_FORWARD_SAFE_NSIPROXYOBJECTMANAGER(_to) \
  74.   NS_IMETHOD GetProxyForObject(nsIEventQueue *destQueue, const nsIID & iid, nsISupports *object, PRInt32 proxyType, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProxyForObject(destQueue, iid, object, proxyType, result); } \
  75.   NS_IMETHOD GetProxy(nsIEventQueue *destQueue, const nsIID & cid, nsISupports *aOuter, const nsIID & iid, PRInt32 proxyType, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProxy(destQueue, cid, aOuter, iid, proxyType, result); } 
  76.  
  77. #if 0
  78. /* Use the code below as a template for the implementation class for this interface. */
  79.  
  80. /* Header file */
  81. class nsProxyObjectManager : public nsIProxyObjectManager
  82. {
  83. public:
  84.   NS_DECL_ISUPPORTS
  85.   NS_DECL_NSIPROXYOBJECTMANAGER
  86.  
  87.   nsProxyObjectManager();
  88.  
  89. private:
  90.   ~nsProxyObjectManager();
  91.  
  92. protected:
  93.   /* additional members */
  94. };
  95.  
  96. /* Implementation file */
  97. NS_IMPL_ISUPPORTS1(nsProxyObjectManager, nsIProxyObjectManager)
  98.  
  99. nsProxyObjectManager::nsProxyObjectManager()
  100. {
  101.   /* member initializers and constructor code */
  102. }
  103.  
  104. nsProxyObjectManager::~nsProxyObjectManager()
  105. {
  106.   /* destructor code */
  107. }
  108.  
  109. /* void getProxyForObject (in nsIEventQueue destQueue, in nsIIDRef iid, in nsISupports object, in PRInt32 proxyType, [iid_is (iid), retval] out nsQIResult result); */
  110. NS_IMETHODIMP nsProxyObjectManager::GetProxyForObject(nsIEventQueue *destQueue, const nsIID & iid, nsISupports *object, PRInt32 proxyType, void * *result)
  111. {
  112.     return NS_ERROR_NOT_IMPLEMENTED;
  113. }
  114.  
  115. /* void getProxy (in nsIEventQueue destQueue, in nsIIDRef cid, in nsISupports aOuter, in nsIIDRef iid, in PRInt32 proxyType, [iid_is (iid), retval] out nsQIResult result); */
  116. NS_IMETHODIMP nsProxyObjectManager::GetProxy(nsIEventQueue *destQueue, const nsIID & cid, nsISupports *aOuter, const nsIID & iid, PRInt32 proxyType, void * *result)
  117. {
  118.     return NS_ERROR_NOT_IMPLEMENTED;
  119. }
  120.  
  121. /* End of implementation class template. */
  122. #endif
  123.  
  124. #include "nsProxyEvent.h"
  125. #define NS_XPCOMPROXY_CONTRACTID "@mozilla.org/xpcomproxy;1"
  126. #define NS_XPCOMPROXY_CLASSNAME "XPCom Proxy"
  127. #define NS_PROXYEVENT_MANAGER_CID                \
  128. { 0xeea90d41,                                      \
  129.   0xb059,                                          \
  130.   0x11d2,                                         \
  131.  {0x91, 0x5e, 0xc1, 0x2b, 0x69, 0x6c, 0x93, 0x33}\
  132. /**
  133.  * Helper function for code that already has a link-time dependency on
  134.  * libxpcom and needs to get proxies in a bunch of different places.
  135.  * This way, the caller isn't forced to get the proxy object manager
  136.  * themselves every single time, thus making the calling code more
  137.  * readable.
  138.  */
  139. extern NS_COM nsresult
  140. NS_GetProxyForObject(nsIEventQueue *destQueue, 
  141.                      REFNSIID aIID, 
  142.                      nsISupports* aObj, 
  143.                      PRInt32 proxyType, 
  144.                      void** aProxyObject);
  145.  
  146. #endif /* __gen_nsIProxyObjectManager_h__ */
  147.